<script language="javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script language="javascript">

var ShareConfig = {
	title:'百花齐放赢大奖，精彩豪礼先到先得哦~',
	desc:'百花齐放赢大奖，精彩豪礼先到先得哦~',
	img:'<{$ShareImage}>',
	link:'<{$B_Url}>',
};

var url = '/<{$Project}>/index.php/main/getjsConf';
$.post(url,{url:location.href},function(obj){
	wx.config({
	    //debug: true,  
	    appId: obj.appid,  
	    timestamp: obj.timestamp, 
	    nonceStr: obj.noncestr, 
	    signature: obj.signature, 
	    jsApiList: [ 'onMenuShareTimeline','onMenuShareAppMessage' ]  
	});
},'json');


wx.ready(function(){
	setShareInfo();
	//document.getElementById('s_bg').play(); 
});

function setShareInfo(){
	wx.onMenuShareTimeline({
	    title: ShareConfig.desc,  
	    link: ShareConfig.link, 
	    imgUrl: ShareConfig.img
	}); 

	wx.onMenuShareAppMessage({
	    title: ShareConfig.title, 
	    desc: ShareConfig.desc, 
	    link: ShareConfig.link, 
	    imgUrl: ShareConfig.img 
	});
}

</script>